package com.hj.base;


import com.hj.base.impl.IBaseModel;
import com.hj.base.impl.IBasePresenter;
import com.hj.base.impl.IBaseView;

/**
 * Created by hp on 2018/4/24.
 */

public abstract class BasePresenter<V extends IBaseView, M extends IBaseModel> implements IBasePresenter<V, M> {
    protected V mView;
    protected M mModel;

    @Override
    public void attachVM(V view, M model) {
        this.mView = view;
        this.mModel = model;
    }

    @Override
    public void detachView() {
        this.mView = null;
        this.mModel = null;
    }

    @Override
    public boolean isViewAttached() {
        return mView != null;
    }
}
